<?php

namespace app\common\model\Goods;

use support\Model;
use think\model\concern\SoftDelete;

/**
 * 商品分类模型
 * Class GoodsCategoryCommonModel
 * @package app\common\model\Goods
 */
class GoodsCategoryCommonModel extends Model
{

    use SoftDelete;

    protected $name = "goods_category";

    protected $pk = "id";

    /**
     * 状态:0=禁用,1=正常
     */
    const STATUS_OFF = 0;
    const STATUS_ON = 1;


    public function children()
    {
        return $this->hasMany(self::class , 'pid' , 'id');
    }
}